package chapter02;

public class Test12_Book {
    public static void main(String[] args) {
        Book b = new Book("三国演义",
                "罗贯中",500);
        b.introduce();

    }
}
class Book{
    private String name;
    private String author;
    private int pages;

    public Book(String name, String author, int pages) {
        this.name = name;
        this.author = author;
        this.pages = pages;
    }
    public void introduce(){
        System.out.println("书名为："+this.name);
        System.out.println("作者为："+this.author);
        System.out.println("页码数为："+this.pages);
    }
}
